<template>
  <view class="task-center-container" :style="{backgroundImage:'url('+staticImgs.pageBg+')'}">
    <view class="task-center-wrapper">
      <view class="back-btn-wrapper">
        <view class="back-btn" @click="backHandle">
          进入测评大厅 >
        </view>
      </view>

      <view class="main-pannel">
        <view class="abs-decoration-wrapper">
          <image class="decoration-img" :src="staticImgs.boxTipImg" mode=""></image>
        </view>
        <view class="left-menu">
          <view v-for="menu in menus" :key="menu.key"
            :class="[menu.key == currentMenuKey ? 'menu-btn-act' : 'menu-btn-default','men-btn']"
            :style="{backgroundImage:menu.key == currentMenuKey ? 'url('+staticImgs.menuAct+')' : 'url('+staticImgs.menuDefault+')'}"
            @click="changeMenu(menu)">
            {{menu.name}}
            <view class="red-dot" v-if="menu.isSclDisCount == 'Y' || (menu.key == 'consult_goods' && isEconsultTaskRed)"></view>
          </view>
          
          <view class="back-list-btn-wrapper" @click="backHandle">
            <image class="img" :src="staticImgs.backSclListBtn" mode="widthFix"></image>
          </view>
        </view>
        <view class="right-content">
          <view class="pannel-wrapper" v-if="currentMenuKey == 'day_visa'">
            <view class="pannel-img">
              <image :src="staticImgs.pannelImg1" mode=""></image>
            </view>
            <view class="pannel-content">
              <view class="pannel-box" :style="{backgroundImage:'url('+staticImgs.taskBoxImg1+')'}">
                <view class="abs-img">
                  <image :src="dailyTaskStatusObj.icon" mode=""></image>
                </view>
                <view class="info-content">每日打卡获得8折测评优惠券</view>
                <view class="abs-btn" :class="dailyTaskStatusObj.classArr" @click="clickDailyTaskHandle">
                  <view class="abs-btn-inner" v-if="dailyTaskStatusObj.text">
                    {{ dailyTaskStatusObj.text }}
                    <view v-if="dailyTaskStatusObj.text=='领取'" class="red-dot"></view>
                  </view>
                </view>

              </view>
            </view>
          </view>
          <view class="pannel-wrapper pannel-2" v-else-if="currentMenuKey == 'subscribe_wechat'">
            <view class="pannel-img">
              <image :src="staticImgs.pannelImg2" mode=""></image>
            </view>
            <view class="pannel-content">
              <view class="pannel-box" :style="{backgroundImage:'url('+staticImgs.taskBoxImg2+')'}">
                <view class="abs-img" v-if="fllowOfficalTaskStatusObj.icon">
                  <image :src="fllowOfficalTaskStatusObj.icon" mode=""></image>
                </view>
                <view class="info-content">{{fllowOfficalTaskStatusObj.description}}</view>
                <view class="abs-btn" :class="fllowOfficalTaskStatusObj.classArr" @click="toSubscribe">
                  <view class="abs-btn-inner" v-if="fllowOfficalTaskStatusObj.text">
                    {{ fllowOfficalTaskStatusObj.text }}
                    <view v-if="fllowOfficalTaskStatusObj.text=='领取'" class="red-dot"></view>
                  </view>
                </view>
              </view>
            </view>
          </view>
          <view class="pannel-wrapper pannel-3" v-else-if="currentMenuKey == 'new_user'">
            <view class="pannel-img">
              <image :src="staticImgs.pannelImg3" mode=""></image>
            </view>
            <view class="pannel-content">
              <view class="pannel-box" :style="{backgroundImage:'url('+staticImgs.taskBoxImg31+')'}">
                <view class="abs-img" v-if="newUserTaskStatusObj.icon">
                  <image :src="newUserTaskStatusObj.icon" mode=""></image>
                </view>
                <view class="info-content">获得400元咨询券及<br />8折测评券</view>
                <view class="abs-btn" :class="newUserTaskStatusObj.classArr" @click="clickNewUserTaskHandle">
                  <view class="abs-btn-inner" v-if="newUserTaskStatusObj.text">
                    {{ newUserTaskStatusObj.text }}
                    <view v-if="newUserTaskStatusObj.text=='领取'" class="red-dot"></view>
                  </view>
                </view>
              </view>

              <template v-if="isInvite">
                <view class="pannel-box" :style="{backgroundImage:'url('+staticImgs.taskBoxImg32+')'}">
                  <view class="abs-img" v-if="inviteUserTaskStatusObj.icon">
                    <image :src="inviteUserTaskStatusObj.icon" mode=""></image>
                  </view>
                  <view class="info-content">5折测评券</view>
                  <view class="abs-btn" :class="inviteUserTaskStatusObj.classArr" @click="clickInviteUserTaskHandle">
                    <view class="abs-btn-inner" v-if="inviteUserTaskStatusObj.text">
                      {{ inviteUserTaskStatusObj.text }}
                      <view v-if="inviteUserTaskStatusObj.text=='领取'" class="red-dot"></view>
                    </view>
                  </view>
                </view>
                <view class="extra-btn" @click="showInvitePoster">
                  我也要邀请好友
                </view>
              </template>
            </view>
          </view>

          <view class="pannel-wrapper pannel-4" v-else-if="currentMenuKey == 'more_scl'">
            <view class="pannel-img">
              <image :src="staticImgs.pannelImg4" mode=""></image>
            </view>
            <view class="pannel-content">
            
              <view class="pannel-box" :style="{backgroundImage:'url('+staticImgs.taskBoxImg4+')'}" v-for="(task,index) in userSclTaskObjArr" :key="index">
                <view class="tit-wrapper">
                  <image class="tit-img" :src="task.headImg" mode=""></image>
                  <image class="icon-img" v-if="task.icon" :src="task.icon" mode=""></image>
                </view>
                <view class="info-content">
                  <view class="text" v-for="(text,tIndex) in task.description" :key="tIndex">
                    {{text}}
                  </view>
                </view>
                <view class="abs-btn" :class="task.classArr" @click="clickSclUsedTaskHandle(index)">
                  <view class="abs-btn-inner">
                    {{ task.text }}
                    <view v-if="task.text=='领取'" class="red-dot"></view>
                  </view>
                </view>
              </view>

<!-- 
              <view class="pannel-box" :style="{backgroundImage:'url('+staticImgs.taskBoxImg4+')'}">
                <view class="tit-wrapper">
                  <image class="tit-img" :src="staticImgs.tastBoxImg4Tit1" mode=""></image>
                  <image class="icon-img" v-if="sclUsedOneTaskStatusObj.icon" :src="sclUsedOneTaskStatusObj.icon"
                    mode=""></image>
                </view>
                <view class="info-content">{{sclUsedOneTaskStatusObj.description}}</view>
                <view class="abs-btn" :class="sclUsedOneTaskStatusObj.classArr" @click="clickSclUsedTaskHandle(1)">
                  <view class="abs-btn-inner">
                    {{ sclUsedOneTaskStatusObj.text }}
                    <view v-if="sclUsedOneTaskStatusObj.text=='领取'" class="red-dot"></view>
                  </view>
                </view>
              </view>
              <view class="pannel-box" :style="{backgroundImage:'url('+staticImgs.taskBoxImg4+')'}">
                <view class="tit-wrapper">
                  <image class="tit-img" :src="staticImgs.tastBoxImg4Tit2" mode=""></image>
                  <image class="icon-img" v-if="sclUsedTwoTaskStatusObj.icon" :src="sclUsedTwoTaskStatusObj.icon"
                    mode=""></image>
                </view>
                <view class="info-content">{{sclUsedTwoTaskStatusObj.description}}</view>
                <view class="abs-btn" :class="sclUsedTwoTaskStatusObj.classArr" @click="clickSclUsedTaskHandle(2)">

                  <view class="abs-btn-inner">
                    {{ sclUsedTwoTaskStatusObj.text }}
                    <view v-if="sclUsedTwoTaskStatusObj.text=='领取'" class="red-dot"></view>
                  </view>
                </view>
              </view>
              <view class="pannel-box" :style="{backgroundImage:'url('+staticImgs.taskBoxImg4+')'}">
                <view class="tit-wrapper">
                  <image class="tit-img" :src="staticImgs.tastBoxImg4Tit3" mode=""></image>
                  <image class="icon-img" v-if="sclUsedThreeTaskStatusObj.icon" :src="sclUsedThreeTaskStatusObj.icon"
                    mode=""></image>
                </view>
                <view class="info-content">{{sclUsedThreeTaskStatusObj.description}}</view>
                <view class="abs-btn" :class="sclUsedThreeTaskStatusObj.classArr" @click="clickSclUsedTaskHandle(3)">

                  <view class="abs-btn-inner">
                    {{ sclUsedThreeTaskStatusObj.text }}
                    <view v-if="sclUsedThreeTaskStatusObj.text=='领取'" class="red-dot"></view>
                  </view>

                </view>
              </view> -->



            </view>
          </view>

          <view class="pannel-wrapper pannel-5" v-else-if="currentMenuKey == 'huddle_warmth'">
            <view class="pannel-img">
              <image :src="staticImgs.pannelImg5" mode=""></image>
            </view>
            <view class="pannel-content" :style="{backgroundImage:'url('+staticImgs.pannelBg5+')'}">
              <view class="pannel-tit">
                「好友完成注册」
              </view>
              <view class="coupon-box" :style="{backgroundImage:'url('+staticImgs.couponBg+')'}">
                5折测评券
              </view>
              <view class="coupon-desc">
                好友可以立刻获得1张测评5折测评券
                您也可获得1张5折测评券
              </view>
              <view class="invite-btn" @click="showInvitePoster">
                邀请好友
              </view>
              <view class="invite-status pannel-5-str">
                邀请好友，并完成注册（{{invitedUsersArr.length}}/5）
              </view>
              <view class="invite-user-list">
                <view class="user-box-wrapper" v-for="i in 5" :key="i">
                  <view class="user-box-img">
                    <image v-if="invitedUsersArr[i] && invitedUsersArr[i].avatar" :src="invitedUsersArr[i].avatar"
                      mode=""></image>
                    <image v-else :src="staticImgs.placeholderImg" mode=""></image>
                  </view>
                  <!-- {{JSON.stringify(invitedUsersArr[i])}} -->
                  <view class="user-get-btn" v-if="invitedUsersArr[i] && invitedUsersArr[i].isDiscount == 'N'"
                    @click="clickGetInviteGift(i)">
                    领取
                    <view class="red-dot"></view>
                  </view>
                  <view class="user-get-btn user-get-btn-def" v-else-if="invitedUsersArr[i]">已领取</view>
                </view>
              </view>

              <template v-if="false">
                <view class="invite-box-tit-2">
                  <view class="pannel-5-str">
                    好友5折测评券（{{friendBuyNum}}/2）
                    <!-- {{JSON.stringify(invitedUsersArr)}} -->
                  </view>
                  <view class="user-get-btn" v-if="invitedDiscountCanGet" @click="clickFriendBuyNumGift">
                    领取
                    <view class="red-dot"></view>
                  </view>
                </view>
                <view class="coupon-desc">
                  您好友进行一次测评，您可以再获得一张测评5折券！最多获得2张
                </view>
                <view class="coupon-box" :style="{backgroundImage:'url('+staticImgs.couponBg+')'}">
                  5折测评券
                </view>
              </template>
              <view style="height: 80rpx;"></view>

            </view>
          </view>
          
          <view class="pannel-wrapper pannel-consult" v-else-if="currentMenuKey == 'consult_goods'">
            <view class="pannel-img">
              <image :src="staticImgs.pannelConsultImg" mode=""></image>
            </view>
            <view class="pannel-content">
            
              <view class="pannel-box" :style="{backgroundImage:'url('+staticImgs.taskBoxImgConsult+')'}" >
                <view class="tit-wrapper">
                  <!-- <image class="tit-img" :src="task.headImg" mode=""></image> -->
                  <!-- <image class="icon-img" v-if="task.icon" :src="task.icon" mode=""></image> -->
                </view>
                <view class="info-content">
                  <view class="text" >首次咨询可享优惠</view>
                  <view class="text" >低至{{eshopConsultPrice}}元/{{eshopConsultMinuteTime}}</view>
                  
                  
                </view>
                <view class="abs-btn" :class="[isShowEconsultBlock ? 'task-btn-act' : 'task-btn-def']" @click="clickEconsultHandle">
                  <view class="abs-btn-inner">
                    {{ isShowEconsultBlock ? '去使用' : '已领取'}}
                  </view>
                </view>
                
              </view>
              </view>
          </view>
        </view>
      </view>
    </view>

    <!-- 弹窗 -->
    <InfoModal @close="closeHandle" :visible="infoModalVisible" />
    <!-- 日签弹窗 -->
    <DailyAffirmationModal confirmType='emit' @confirm="confirmDilayCheckinModalHandle"
      @close="closeDailyCheckinModalHandle" ref="dailyModal" />
    <!-- 折扣弹窗 -->
    <DiscountModal :discountNum="currentModalDiscountNum" :visible="discountInfoModalVisible"
      @confirm="discountInfoModalConfirmHandle" @close="discountInfoModalCloseHandle" />
    <InvitePosterModal :avatar="avatar" :nickName="nickName" :clientUserUid="clientUserUid" @close="posterModalVisible=false" :visible="posterModalVisible" />
    <!-- 新人优惠券弹窗 -->
    <CouponPopup :getEvent="true" :visible="newUserCouponVisible" @close="clonseNewUserCouponModalHandle" />
    <!-- 公众号弹窗 -->
    <OfficalAccountModal :discountNum="officalAccountDiscountNum" :visible="officalAccountModalVisible"
      @close="closeOfficalAccountModalHandle"></OfficalAccountModal>
    <!-- 公众号关注成功后的提示弹窗 -->
    <OfficalAccountGiftModal :discountNum="officalAccountDiscountNum"
      :discountValidHour="officalAccountDiscountValidNumber" :visible="officalAccountGiftModalVisible"
      @confirm="confirmHandle" @close="closeOfficalAccountGiftModalHandle"></OfficalAccountGiftModal>
    <!-- 弹窗 -->


    <view style="position: fixed; top: -9999rpx">
      <!-- #ifdef MP-WEIXIN -->
      <canvas id="dcanvas" type="2d" style="zoom: 50%;width: 750px; height: 1360px;" />
      <!-- #endif -->
      <!-- #ifndef MP-WEIXIN -->
      <canvas canvas-id="dcanvas" id="dcanvas" style="zoom: 50%;width: 750px; height: 1360px;" />
      <!-- #endif -->
    </view>
  </view>
</template>

<script>
  import InfoModal from './comp/InfoModal.vue'
  import {
    getTaskList,
    taskDiscountBindList,
    getIniviteUserTaskInfo,
    getTaskGiftById,
    checkTargetTaskStatus
  } from '@/common/api/task'
  import {
    checkUserTodyIsCheckin
  } from '@/common/api/dailyCheckin.js'
  import {
    getUserDiscountInfo
  } from '@/common/api/user_api.js'
  import DailyAffirmationModal from '@/components/DailyAffirmationModal.vue'
  
  import DiscountModal from '@/subcontractorC/components/DiscountInfoModal.vue'
  import InvitePosterModal from './comp/InvitePosterModal.vue'
  import CouponPopup from '@/subcontractorC/components/CouponPopup.vue'
  import OfficalAccountModal from './comp/OfficalAccountModal.vue'
  import OfficalAccountGiftModal from './comp/OfficalAccountGiftModal.vue'

import {
		updateUserInfo
	} from '@/common/api/user_api.js'
  import {
    mapGetters,
    mapState
  } from 'vuex'

  import {
    debounce
  } from 'lodash'

  export default {
    components: {
      InfoModal,
      DailyAffirmationModal,
      DiscountModal,
      InvitePosterModal,
      CouponPopup,
      OfficalAccountModal,
      OfficalAccountGiftModal
    },
    data() {
      return {
        menus: [],
        staticImgs: {
          pageBg: this.imgBaseURL + '/task-center/page-bg.png',
          boxTipImg: this.imgBaseURL + '/task-center/page-img-1.png',
          menuDefault: this.imgBaseURL + '/task-center/menu-btn-default.png',
          menuAct: this.imgBaseURL + '/task-center/menu-btn-act.png',
          taskBoxImg1: this.imgBaseURL + '/task-center/main-box-img-1.png',
          pannelImg1: this.imgBaseURL + '/task-center/main-img-1.png',
          pannelImg2: this.imgBaseURL + '/task-center/pannel-2-img.png',
          pannelImg3: this.imgBaseURL + '/task-center/pannel-3-img.png',
          pannelImg4: this.imgBaseURL + '/task-center/pannel-4-img.png',
          pannelImg5: this.imgBaseURL + '/task-center/pannel-5-img-psychology.png',
          pannelConsultImg: this.imgBaseURL + '/task-center/pannel-consult-img.png',
          taskBoxImg2: this.imgBaseURL + '/task-center/pannel-2-box-img.png',
          taskBoxImg31: this.imgBaseURL + '/task-center/pannel-3-box-img-1.png',
          taskBoxImg32: this.imgBaseURL + '/task-center/pannel-3-box-img-2.png',
          taskBoxImg4: this.imgBaseURL + '/task-center/pannel-4-box-img.png',
          taskBoxImgConsult: this.imgBaseURL + '/task-center/pannel-consult-bg.png',
          tastBoxImg4Tit1: this.imgBaseURL + '/task-center/pannel-4-box-tit-1.png',
          tastBoxImg4Tit2: this.imgBaseURL + '/task-center/pannel-4-box-tit-2.png',
          tastBoxImg4Tit3: this.imgBaseURL + '/task-center/pannel-4-box-tit-3.png',
          tastBoxImg4Tit4: this.imgBaseURL + '/task-center/pannel-4-box-tit-4.png',
          tastBoxImg4TitEshop: this.imgBaseURL + '/task-center/pannel-4-box-tit-eshop.png',
          infoIcon: this.imgBaseURL + '/task-center/info-icon.png',
          doneIcon: this.imgBaseURL + '/task-center/done-icon.png',
          pannelBg5: this.imgBaseURL + '/task-center/pannel-5-bg.png',
          placeholderImg: this.imgBaseURL + '/task-center/pannel-5-img-1.png',
          couponBg: this.imgBaseURL + '/task-center/coupon-bg.png',
          backSclListBtn:this.imgBaseURL + '/scl/back-scllist-btn-img.png',
        },
        officalAccountModalVisible: false,
        officalAccountGiftModalVisible: false,
        // officalAccountGiftModalVisible:false,
        currentMenuKey: 'day_visa',
        infoModalVisible: false,
        dailyTaskStatus: '0',
        discountInfoModalVisible: false,
        currentModalDiscountNum: 8,
        currentDiscountType: '',
        eConsultTaskObj:{
          text: '已领取',
          icon: '',
          classArr: ['task-btn-def']
        },

        newUserTaskStatusObj: {
          text: '已领取',
          icon: '',
          classArr: ['task-btn-def']
        },
        inviteUserTaskStatusObj: {},

        sclUsedOneTaskStatusObj: {},
        sclUsedTwoTaskStatusObj: {},
        sclUsedThreeTaskStatusObj: {},

        fllowOfficalTaskStatusObj: {},
        invitedUsersArr: [],
        invitedDiscountCanGet: false,
        posterModalVisible: false,
        newUserCouponVisible: false,
        discountList: [],

        friendBuyNumGiftArr: [],

        friendBuyNum: 0,
        initOk: false,
        loading: false,
        useOfficalAccountMenu: false,
        useInviteMenu:false,
        CONST_IDS: {
          newUserGift: '1768533691772817412',
          inviteUserGift: '1768533691772817414',
          sclUsedOneGift: '1768532201683402763',
          sclUseTwoGift: '1768533691772817409',
          sclUseThreeGift: '1768533691772817410'
        },
        userSclTaskObjArr:[],
        eshopConsultPrice:25.9,
        eshopConsultMinuteTime:'20分钟'
      }
    },
    
    async onLoad(opts) {
      if (opts.paramObj) {
        const tmpObj = JSON.parse(opts.paramObj)
        if (tmpObj.from == 'offical') {
          this.useOfficalAccountMenu = true
          console.log(this.useOfficalAccountMenu, '---this.useOfficalAccountMenu')
        }else if(tmpObj.from = 'invite'){
          this.useInviteMenu = true
        }
      }
      uni.showLoading()
      await this.initPageData(true)
      this.initOk = true
      uni.hideLoading()
      console.log(opts, '-------paramObj')
    },
    async onShow() {
      if (this.initOk) {
        return
      }
      uni.showLoading()
      await this.initPageData(true)
        // this.officalAccountModalVisible = true
      uni.hideLoading()
    },
    watch: {
      currentMenuKey(val, oldVal) {
        if (val != oldVal) {

          this.checkTaskInfo(val)
        }
      }
    },
    computed: {
      ...mapGetters('user', [
        'isInvite',
        'discountOfficalAccount',
        'isEshopUser',
        'hasShowTaskNotice',
          'clientUserUid',
          'avatar',
          'nickName'
        // ...mapGetters('user', [
        //   'clientUserUid',
        //   'avatar',
        //   'nickName'
        // ]),	
      ]),
      ...mapState({
        isShowEconsultBlock:state=> state.user.isShowEconsultBlock,
        userJson:state=>state.user.userJson,
      }),
      isEconsultTaskRed(){
        return this.hasShowTaskNotice && this.isShowEconsultBlock
      },
      dailyTaskStatusObj() {
        return this.dailyTaskStatus == '1' ? {
          text: '前往',
          icon: this.staticImgs.infoIcon,
          classArr: ['daily-task-btn-act']
        } : {
          text: '已领取',
          icon: '',
          classArr: ['daily-task-btn-def']
        }
      },
      officalAccountDiscountNum() {
        try {
          return parseInt(this.discountOfficalAccount.discount)
        } catch (e) {
          return 6
        }
      },
      officalAccountDiscountValidNumber() {
        try {
          return parseInt(this.discountOfficalAccount.validNumber)
        } catch (e) {
          return 72
        }
      }
    },
    methods: {
      clickEconsultHandle(){
        if(this.isShowEconsultBlock){
          uni.redirectTo({
            url:'/subcontractorA/pages/eshopConsult/eshopConsult'
          })
        }
      },
      async toSubscribe() {
        if (this.fllowOfficalTaskStatusObj.text === '已领取') {
          // this.officalAccountModalVisible = true
          return this.$showToast('您已领取过该优惠券')
        } else if (this.fllowOfficalTaskStatusObj.text === '前往') {
          return this.officalAccountModalVisible = true
        }

        await this.getTaskGiftById(this.fllowOfficalTaskStatusObj.taskBindId)
        this.currentModalDiscountNum = this.fllowOfficalTaskStatusObj.discount
        // this.discountInfoModalVisible = true
        this.officalAccountGiftModalVisible = true
        this.currentDiscountType = 'byFllow'
      },
      async clickInviteUserTaskHandle() {
        if(this.inviteUserTaskStatusObj.text == '去使用'){
          return uni.reLaunch({
            url:'/pages/sclList/sclList'
          })
        }else if (this.inviteUserTaskStatusObj.text !== '领取') {
          return this.$showToast('您已领取过该优惠券')
        }

        await this.getTaskGiftById(this.inviteUserTaskStatusObj.taskBindId)
        this.currentModalDiscountNum = this.inviteUserTaskStatusObj.discount
        this.discountInfoModalVisible = true
        this.currentDiscountType = 'byInvited'
      },
      showInvitePoster() {
        this.posterModalVisible = true
      },
      getTaskGiftById: debounce(async function(taskBindId) {
        if (this.loading) {
          return false
        }
        this.loading = true

        const {
          data: dRes
        } = await getTaskGiftById({
          taskBindId
        })

        if (dRes.success) {
          console.log(dRes, '----getTaskGiftById----')
          await this.checkTaskInfo(this.currentMenuKey)

        }

        setTimeout(() => {
          this.loading = false
        }, 1000)
      }, 200),
      async getIniviteUserTaskInfo() {
        const {
          data: dRes
        } = await getIniviteUserTaskInfo({
          taskId: '1768518266339016705'
        })
        if (dRes.success) {
          this.invitedUsersArr = dRes.data.inviteeBOList
          this.friendBuyNum = (dRes.data.friendsNum || 0) > 2 ? 2 : dRes.data.friendsNum
        }
        console.log(dRes, '-----getIniviteUserTaskInfo')
      },
      discountInfoModalConfirmHandle() {
        this.checkCloseModalEvent()
        this.discountInfoModalVisible = false
      },
      checkCloseModalEvent() {
        if (this.currentDiscountType == 'daily') {
          this.initPageData(false,true)
          this.checkTaskInfo(this.currentMenuKey)
          uni.navigateTo({
            url: '/subcontractorC/pages/daily/dailyAffirmation'
          })
        } else if (this.currentDiscountType == 'sclUsed' || this.currentDiscountType == 'byInvited' || this
          .currentDiscountType == 'inviteGift' || this.currentDiscountType == 'friendBuyNumGift' || this
          .currentDiscountType == 'byFllow') {
          this.initPageData(false,true)
          this.checkTaskInfo(this.currentMenuKey)
        }
      },
      discountInfoModalCloseHandle() {
        this.discountInfoModalVisible = false
      },
      closeOfficalAccountModalHandle() {
        this.officalAccountModalVisible = false
      },
      confirmHandle() {
        uni.reLaunch({
          url: '/pages/sclList/sclList'
        })
      },
      closeOfficalAccountGiftModalHandle() {
        this.initPageData()
        this.officalAccountGiftModalVisible = false
      },
      async clonseNewUserCouponModalHandle() {
        await this.initPageData(false,true)
        await this.checkTaskInfo('new_user')
        this.newUserCouponVisible = false
      },
      confirmDilayCheckinModalHandle() {
        setTimeout(() => {
          this.discountInfoModalVisible = true
        }, 500)
        this.currentModalDiscountNum = 8
        this.currentDiscountType = 'daily'
      },
      clickDailyTaskHandle() {
        if (this.dailyTaskStatus == '1') {
          this.$refs.dailyModal.show()
        } else {
          this.$showToast('今日已签到,请明日继续')
        }
      },
      async closeDailyCheckinModalHandle() {
        await this.initPageData()
      },
      async initPageData(setInitKey,dontChangeCurrentKey) {
        const {
          data: dRes
        } = await getTaskList()
        const initCurrentMenuKey = this.currentMenuKey
        
        this.$u.api.getEshopConsultGoodsList().then(res => {
          if(res.data.code == 200){
            const {data:dRes} = res.data
            this.eshopConsultPrice = dRes[0].price
            this.eshopConsultMinuteTime = dRes[0].minuteTime
          }
        })
        
        const {data: nextRes } = await checkTargetTaskStatus({taskCode:'yiyuan'})
        let setOff = true
        if (dRes.success) {
          const tmpMenus = []
          dRes.data.map(item => {
            tmpMenus.push({
              ...item,
              key: item.code
            })
            
            
            if(this.useInviteMenu){
              this.currentMenuKey = 'huddle_warmth'
              setOff = false
            } else if(nextRes.data == 'N'){
              // this.currentMenuKey = 'more_scl'
              // this.currentMenuKey = 'more_scl'
              this.currentMenuKey = 'subscribe_wechat'
              setOff = false
            } else if (this.useOfficalAccountMenu) {
              console.log('-------------- this.currentMenuKey this.currentMenuKey')
              this.currentMenuKey = 'subscribe_wechat'
              setOff = false
            } else if (setInitKey && item.isSclDisCount == 'Y') {
              this.currentMenuKey = item.code
              setOff = false
            }
            
          
          })

          this.menus = tmpMenus

          if (setOff) {
            let findObj = dRes.data.find(item => item.isUserTask == 'Y')
            if (findObj) {
              this.currentMenuKey = findObj.code
            }
          }
        }



        console.log(this.currentMenuKey, '------this.currentMenuKey =')
        if(dontChangeCurrentKey){
          this.currentMenuKey = initCurrentMenuKey
        }
        if (setInitKey) {
          this.checkTaskInfo(this.currentMenuKey)
        }
        await this.checkUserTodyIsCheckin()
        console.log(dRes, '========getTaskList======')
      },

      async checkUserTodyIsCheckin() {
        const {
          data: dRes
        } = await checkUserTodyIsCheckin()
        if (dRes.data?.visaUserToDay == 'N') {
          //未签到过，可点击前往 然后先领取到优惠券，再前往打开页
          this.dailyTaskStatus = '1'
        } else {
          this.dailyTaskStatus = '0'
        }
      },
      clickNewUserTaskHandle() {
        if (this.newUserTaskStatusObj.text == '领取') {
          this.newUserCouponVisible = true
        } else if(this.newUserTaskStatusObj.text == '去使用'){
          uni.reLaunch({
            url:'/pages/sclList/sclList'
          })
        } else {
          this.$showToast('您已领取过新人优惠')
        }
      },
      async checkTaskInfo(taskCode) {
        uni.showLoading()

        const taskId = this.menus.find(item => item.code == taskCode).id
        const {
          data: dRes
        } = await taskDiscountBindList({
          taskId: taskId
        })
        
        
        
        /**
         * disCountId: null
          disCountName: "新人好友测评7折券"
          isComplete: "N"
          isGetDisCount: "N"
          taskBindId: "1768533691772817414"
         */

        if (dRes.success) {
          this.discountList = dRes.data
          if (taskCode == 'new_user') {
            this.processDataToUserTaskObj(dRes.data)
          } else if (taskCode == 'more_scl') {
            this.processDataToSclUsedTaskObj(dRes.data)
          } else if (taskCode == 'huddle_warmth') {
            this.processDataToInviteTaskObj(dRes.data)
          } else if (taskCode == 'subscribe_wechat') {
            const item = dRes.data[0]
            let tmpObj = {}
            if (item.isComplete == 'N') {
              //未完成则展示前往
              tmpObj = {
                text: '前往',
                description: item.disCountName,
                icon: this.staticImgs.infoIcon,
                classArr: ['task-btn-act'],
                status: '0',
                discount: item.discount,
                taskBindId: item.taskBindId
              }
              // if(val == 'subscribe_wechat'){
              // console.log(this.useOfficalAccountMenu,'----this.useOfficalAccountMenu')
              if (!this.useOfficalAccountMenu) {

                this.officalAccountModalVisible = true
              }
              // }
            } else if (item.isComplete == 'Y' && item.isGetDisCount == 'Y') {
              if(item.isOverTime == 'Y'){
                //已完成已领取
                tmpObj = {
                  text: '已领取',
                  icon: '',
                  description: item.disCountName,
                  classArr: ['task-btn-def'],
                  status: '2',
                  discount: item.discount,
                  taskBindId: item.taskBindId
                }
              }else{
                //已完成已领取未过期
                tmpObj = {
                  text: '去使用',
                  icon: '',
                  description: item.disCountName,
                  classArr: ['task-btn-act'],
                  status: '1',
                  discount: item.discount,
                  taskBindId: item.taskBindId
                }
              }
              
            } else if (item.isComplete == 'Y' && item.isGetDisCount == 'N') {
              //已完成未领取
              tmpObj = {
                text: '领取',
                description: item.disCountName,
                icon: this.staticImgs.doneIcon,
                classArr: ['task-btn-act'],
                status: '1',
                discount: item.discount,
                taskBindId: item.taskBindId
              }
            }
            this.fllowOfficalTaskStatusObj = tmpObj

            console.log(this.fllowOfficalTaskStatusObj, '-------this.fllowOfficalTaskStatusObj')
          }
        }

        if (taskCode == 'huddle_warmth') {
          await this.getIniviteUserTaskInfo()
        }
        console.log(dRes, '------dRes-----')

        uni.hideLoading()

        if (taskCode == 'subscribe_wechat' && this.useOfficalAccountMenu) {
          setTimeout(() => {
            this.useOfficalAccountMenu = false
            this.toSubscribe()
          }, 500)
        }

      },
      processDataToInviteTaskObj(dResData) {
        this.friendBuyNumGiftArr = dResData.slice(dResData.length - 2)
        this.invitedDiscountCanGet = this.friendBuyNumGiftArr.find(item => item.isComplete == 'Y' && item
          .isGetDisCount == 'N') ? true : false
      },
      clickFriendBuyNumGift: debounce(async function() {
        if (this.loading) {
          return false
        }
        this.loading = true
        const tmpDiscountObj = this.friendBuyNumGiftArr[this.friendBuyNum - 1]
        console.log(tmpDiscountObj, '------tmpDiscountObj')
        if (tmpDiscountObj) {
          uni.showLoading()
          const {
            data: dRes
          } = await getTaskGiftById({
            taskBindId: tmpDiscountObj.taskBindId
          })
          if (dRes.success) {
            setTimeout(() => {
              this.discountInfoModalVisible = true
            }, 100)
            // console.log(discount,'------discount-----discount')
            this.currentModalDiscountNum = tmpDiscountObj.discount
            this.currentDiscountType = 'friendBuyNumGift'
          } else {
            uni.showToast({
              title: '接口异常，请联系管理员'
            })
          }
          uni.hideLoading()
        }
        setTimeout(() => {
          this.loading = false
        }, 1000)
      }, 200),
      processDataToUserTaskObj(dResData) {
        let tmpObj = dResData.find(item => item.taskBindId == this.CONST_IDS.newUserGift)
        if (tmpObj) {
          if(tmpObj.isGetDisCount == 'Y' && tmpObj.isOverTime == 'N'){
            this.newUserTaskStatusObj = {
              text: '去使用',
              icon: '',
              classArr: ['task-btn-act']
            }
          }else if(tmpObj.isGetDisCount == 'Y' && tmpObj.isOverTime == 'Y'){
            this.newUserTaskStatusObj = {
              text: '已领取',
              icon: '',
              classArr: ['task-btn-def']
            }
          }else{
            this.newUserTaskStatusObj = {
              text: '领取',
              icon: this.staticImgs.doneIcon,
              classArr: ['task-btn-act']
            }
          }
          
        }
        
        tmpObj = dResData.find(item => item.taskBindId == this.CONST_IDS.inviteUserGift)
        if (tmpObj) {
          if(tmpObj.isGetDisCount == 'Y' && tmpObj.isOverTime == 'N'){
            this.inviteUserTaskStatusObj =  {
              text: '去使用',
              icon: '',
              classArr: ['task-btn-act'],
              status: '2'
            }
          }else if(tmpObj.isGetDisCount == 'Y' && tmpObj.isOverTime == 'Y'){
            this.inviteUserTaskStatusObj =  {
              text: '已领取',
              icon: '',
              classArr: ['task-btn-def'],
              status: '2'
            }
          }else{
            this.inviteUserTaskStatusObj = {
              text: '领取',
              icon: this.staticImgs.doneIcon,
              classArr: ['task-btn-act'],
              status: '1',
              taskBindId: tmpObj.taskBindId,
              discount: tmpObj.discount
            }
          }
        }
      },
      clickGetInviteGift: debounce(async function(index) {
        if (this.loading) {
          return false
        }
        this.loading = true

        // const tmpDiscountObj = this.invitedUsersArr[index]
        // const tmpDiscountObj = this.invitedUsersArr[index]
        const tmpDiscountObj = this.discountList[index]

        console.log(tmpDiscountObj, '------tmpDiscountObj')
        if (tmpDiscountObj) {
          const {
            data: dRes
          } = await getTaskGiftById({
            taskBindId: tmpDiscountObj.taskBindId
          })
          if (dRes.success) {
            setTimeout(() => {
              this.discountInfoModalVisible = true
            }, 500)
            // console.log(discount,'------discount-----discount')
            this.currentModalDiscountNum = tmpDiscountObj.discount
            this.currentDiscountType = 'inviteGift'
          } else {
            uni.showToast({
              title: '接口异常，请联系管理员'
            })
          }
        }
        setTimeout(() => {
          this.loading = false
        }, 1000)
      }, 200),
      clickSclUsedTaskHandle: debounce(async function(num) {
        if (this.loading) {
          return false
        }
        this.loading = true

        let tmpId = ''
        let discount = 8
        const targetObj = this.userSclTaskObjArr[num]
        
        if (targetObj.status == '0') {
          uni.reLaunch({
            url: '/pages/sclList/sclList'
          })
        } else if (targetObj.status == '1') {
          tmpId = targetObj.taskBindId
          discount = targetObj.discount
        }
        

        if (tmpId) {
          await getTaskGiftById({
            taskBindId: tmpId
          })
          setTimeout(() => {
            this.discountInfoModalVisible = true
          }, 500)
          console.log(discount, '------discount-----discount')
          this.currentModalDiscountNum = discount
          this.currentDiscountType = 'sclUsed'
        }

        setTimeout(() => {
          this.loading = false
        }, 1000)
      }, 200),
      processDataToSclUsedTaskObj(dResData) {
        let tmpObj = {}
        this.userSclTaskObjArr = [] 
        dResData.map((item,index) => {
          
            if (item.isComplete == 'N') {
              //未完成则展示前往
              tmpObj = {
                text: '前往',
                description: item.disCountName,
                icon: this.staticImgs.infoIcon,
                classArr: ['task-btn-act'],
                status: '0',
                discount: item.discount,
                taskBindId: item.taskBindId
              }
            } else if (item.isComplete == 'Y' && item.isGetDisCount == 'Y') {
              if(item.isOverTime == 'Y'){
                //已完成已领取
                tmpObj = {
                  text: '已领取',
                  icon: '',
                  description: item.disCountName,
                  classArr: ['task-btn-def'],
                  status: '2',
                  discount: item.discount,
                  taskBindId: item.taskBindId
                }
              }else{
                //已完成已领取未过期
                tmpObj = {
                  text: '去使用',
                  icon: '',
                  description: item.disCountName,
                  classArr: ['task-btn-act'],
                  status: '0',
                  discount: item.discount,
                  taskBindId: item.taskBindId
                }
              }
            } else if (item.isComplete == 'Y' && item.isGetDisCount == 'N') {
              //已完成未领取
              tmpObj = {
                text: '领取',
                description: item.disCountName,
                icon: this.staticImgs.doneIcon,
                classArr: ['task-btn-act'],
                status: '1',
                discount: item.discount,
                taskBindId: item.taskBindId
              }
            }
          if(this.isEshopUser && index === 0){
            tmpObj.headImg = this.staticImgs['tastBoxImg4TitEshop']
          }else{
            if(this.isEshopUser){
              tmpObj.headImg = this.staticImgs['tastBoxImg4Tit'+(index)]
            }else{
              tmpObj.headImg = this.staticImgs['tastBoxImg4Tit'+(index+1)]
            }
          }
          tmpObj.description = tmpObj.description.split(',')
         
          this.userSclTaskObjArr.push(tmpObj)
          
        })
      },
      backHandle() {
        uni.reLaunch({
          url: '/pages/sclList/sclList'
        })
      },
      changeMenu(menu) {
        this.currentMenuKey = menu.key
        
        if(menu.key == 'consult_goods'){
         let tmpJsonStr
         try{
           tmpJsonStr = JSON.parse(this.userJson)
           tmpJsonStr = JSON.stringify({
             ...tmpJsonStr,
             hasShowTaskNotice:'N'
           })
         }catch(e){
           tmpJsonStr=JSON.stringify({
             hasShowTaskNotice:'N'
           })
         }
         
         updateUserInfo({
           userJson: tmpJsonStr
         }).then(res=>{
           this.$store.commit('user/setUserJson',tmpJsonStr)
         }) 
        }
      },
      closeHandle() {
        this.infoModalVisible = false
      }

    }
  }
</script>

<style lang="scss" scoped>
  /deep/.count-time .u-count-down .u-count-down__text {
    font-family: PingFangSC, PingFang SC;
    font-weight: 400;
    font-size: 24rpx !important;
    color: #666666 !important;
    line-height: 33rpx !important;
    text-align: left;
    font-style: normal;
  }
  
  

  .task-center-container {
    min-height: 100vh;
    width: 100vw;
    box-sizing: border-box;
    position: relative;
    background-size: cover;
    background-repeat: no-repeat;

    background: #F3FCEA;
    background-size: 100% 100%;
  }

  .task-center-wrapper {
    background-size: 100% 100%;

    .back-btn-wrapper {
      padding-top: calc(var(--status-bar-height) + 26rpx);
      // position: absolute;
      // padding-left: 30rpx;
      position: relative;

      .back-btn {
        //扩大点击范围
        padding: 30rpx;
        width: fit-content;
        font-family: PingFang-SC, PingFang-SC;
        font-weight: 500;
        font-size: 26rpx;
        color: #FFEF8E;
        line-height: 37rpx;
        text-align: left;
        font-style: normal;
      }

    }

    .main-pannel {
      // width: 700rpx;
      height: 70vh;
      margin: auto;
      margin-top: 154rpx;
      position: relative;
      display: flex;

      // background-color: #fff;

      .abs-decoration-wrapper {
        position: absolute;
        top: -144rpx;
        left: 26rpx;
        right: 0;

        .decoration-img {
          width: 704rpx;
          height: 182rpx;
          margin: auto;
        }
      }

      .left-menu {
        display: flex;
        flex-direction: column;
        row-gap: 18rpx;
        width: 214rpx;

        // margin-top: -8rpx;
        .men-btn {
          font-family: PingFang-SC, PingFang-SC;
          font-weight: bold;
          font-size: 30rpx;
          color: #FFFFFF;
          line-height: 42rpx;
          text-align: left;
          font-style: normal;
          background-size: 100%;
          box-sizing: border-box;
          padding-left: 18rpx;

          position: relative;

          .red-dot {
            position: absolute;
            right: 2rpx;
            top: 20rpx;

            width: 22rpx;
            height: 22rpx;
            background: #FF2424;
            border: 2rpx solid #FFFFFF;
            border-radius: 50%;
          }
        }

        .menu-btn-default {
          width: 194rpx;
          height: 98rpx;
          line-height: 98rpx;
        }

        .menu-btn-act {
          width: 216rpx;
          height: 104rpx;
          line-height: 104rpx;
        }
        
        
        .back-list-btn-wrapper{
          width: 170rpx;
          height: 480rpx;
          margin: auto;
          
          .img{
            width: 100%;
            height: 100%;
          }
        }

      }

      // left-menu - end

      .right-content {
        border-radius: 14rpx;
        // height: 800rpx;
        max-height: 80vh;
        overflow: hidden;

        width: 512rpx;
        margin-top: 8rpx;
        background-color: #fff;
        background: linear-gradient(149deg, #FEDBB0 0%, #FFFFFF 100%);
        box-shadow: 0rpx 2rpx 20rpx 0rpx #FBC4A4;



        .pannel-wrapper {
          height: 100%;

          .pannel-img {
            // border-radius: ;
            width: 512rpx;
            height: 500rpx;

            image {
              width: 100%;
              height: 100%;
            }

            position: relative;

            &::after {
              position: absolute;
              bottom: -20rpx;
              left: 0;
              right: 0;
              height: 20rpx;
              // background-color: #FEDBB0;
              background: linear-gradient(149deg, #FEDBB0 0%, #fffcec 100%);
              content: '';
              z-index: 2;
            }
          }

          .pannel-content {
            // padding: 20rpx 0;
            // display: flex;
            // flex-direction: column;
            // row-gap: 24rpx;


            .pannel-box {
              margin: auto;
              margin-top: 24rpx;
              position: relative;
              width: 474rpx;
              height: 342rpx;
              background-size: 100%;
              background-repeat: no-repeat;

              .abs-img {
                position: absolute;
                left: 210rpx;
                top: 46rpx;
                width: 34rpx;
                height: 34rpx;

                image {
                  width: 100%;
                  height: 100%;
                }
              }

              .info-content {
                padding-top: 128rpx;
                margin-left: 38rpx;

                font-family: PingFangSC, PingFang SC;
                font-weight: 500;
                font-size: 30rpx;
                color: #801608;
                line-height: 42rpx;
                text-align: left;
                font-style: normal;
              }

              .abs-btn {
                position: absolute;
                right: 38rpx;
                bottom: 50rpx;
                width: 153rpx;
                height: 56rpx;
                background: linear-gradient(270deg, #FFB75B 0%, #FC6019 100%);
                border-radius: 28rpx;

                font-family: PingFangSC, PingFang SC;
                font-weight: 400;
                font-size: 30rpx;
                color: #FFFFFF;
                // line-height: 42rpx;
                // text-align: left;
                font-style: normal;

                line-height: 56rpx;
                text-align: center;
              }
            }
          }
        }

        // pannel-wrapper - end
        
        .pannel-consult{
          
          .pannel-content{
            .info-content{
              padding-top:88rpx !important;
            }
            .abs-btn{
              bottom:64rpx !important;
            }
          }
        }

        .pannel-1 {}

        // pannel-1 - end
        .pannel-2 {
          .pannel-box .abs-img {
            top: 44rpx !important;
            left: 250rpx !important;
          }

        }

        // pannel-2 -end

        .pannel-3 {
          .pannel-box .abs-img {
            top: 42rpx !important;
            left: 214rpx !important;
            // left: 250rpx !important;
          }

          .pannel-img {
            height: 360rpx;
          }

          .pannel-box .info-content {
            padding-top: 104rpx !important;
          }

          .pannel-content {
            height: calc(100% - 360rpx);
            overflow: scroll;
          }

          .extra-btn {
            margin: auto;
            margin-top: 30rpx;
            margin-bottom: 100rpx;


            font-family: PingFangSC, PingFang SC;
            font-weight: 400;
            font-size: 30rpx;
            color: #FFFFFF;
            line-height: 56rpx;
            text-align: left;
            font-style: normal;
            text-align: center;

            width: 260rpx;
            height: 56rpx;
            background: linear-gradient(270deg, #FFB75B 0%, #FC6019 100%);
            border-radius: 28rpx;

          }
        }

        // pannel-3 - end

        .pannel-4 {
          .pannel-img {
            height: 360rpx;
          }

          .pannel-content {
            height: calc(100% - 360rpx);
            overflow: scroll;
            box-sizing: border-box;
            padding-bottom: 40rpx;
          }

          .pannel-box {
            .tit-wrapper {
              padding: 55rpx 0 0 55rpx;
              display: flex;
              align-items: center;

              .tit-img {
                width: 206rpx;
                height: 38rpx;
              }

              .icon-img {
                margin-left: 6rpx;
                width: 34rpx;
                height: 34rpx;
              }
            }

            .info-content {
              padding-top: 26rpx !important;
              .text{
                font-family: PingFangSC, PingFang SC;
                font-weight: 500;
                font-size: 30rpx;
                color: #801608;
                line-height: 42rpx;
                text-align: left;
                font-style: normal;
              }
            }
          }
        }

        // pannel-4 - end

        .pannel-5 {
          .pannel-img {
            height: 360rpx;

            &::after {
              display: none;
            }
          }

          .pannel-content {
            height: calc(100% - 360rpx);
            overflow: scroll;

            background-size: 100%;
            background-repeat: no-repeat;
            padding: 0 20rpx;

            .pannel-tit {
              text-align: center;
              margin-top: 20rpx;
              font-family: PingFangSC, PingFang SC;
              font-weight: 600;
              font-size: 30rpx;
              color: #801608;
              font-style: normal;
            }

            .coupon-box {
              width: 224rpx;
              height: 94rpx;

              margin: auto;
              margin-top: 12rpx;

              background-size: 100%;
              background-repeat: no-repeat;

              font-family: PingFangSC, PingFang SC;
              font-weight: 600;
              font-size: 32rpx;
              color: #E1122E;
              line-height: 94rpx;
              text-align: center;
              font-style: normal;
            }

            .coupon-desc {
              margin-top: 14rpx;
              font-family: PingFangSC, PingFang SC;
              font-weight: 400;
              font-size: 28rpx;
              color: #801608;
              line-height: 40rpx;
              text-align: left;
              font-style: normal;
            }

            .invite-btn {
              margin: auto;
              margin-top: 20rpx;
              font-family: PingFangSC, PingFang SC;
              font-weight: 400;
              font-size: 30rpx;
              color: #FFFFFF;
              line-height: 56rpx;
              text-align: center;
              font-style: normal;

              width: 260rpx;
              height: 56rpx;
              background: linear-gradient(270deg, #FFB75B 0%, #FC6019 100%);
              border-radius: 28rpx;
            }

            .invite-status {
              margin-top: 30rpx;

            }

            .pannel-5-str {
              font-family: PingFangSC, PingFang SC;
              font-weight: 500;
              font-size: 28rpx;
              color: #801608;
              line-height: 40rpx;
              text-align: left;
              font-style: normal;
            }

            .user-get-btn {
              // margin-top: 16rpx;

              width: 80rpx;
              height: 36rpx;
              background: linear-gradient(270deg, #FFB75B 0%, #FC6019 100%);
              border-radius: 18rpx;

              font-family: PingFangSC, PingFang SC;
              font-weight: 400;
              font-size: 26rpx;
              color: #FFFFFF;
              line-height: 37rpx;
              text-align: center;
              font-style: normal;
              position: relative;

              .red-dot {
                position: absolute;
                right: 2rpx;
                top: -8rpx;

                width: 18rpx;
                height: 18rpx;
                background: #FF2424;
                border: 2rpx solid #FFFFFF;
                border-radius: 50%;
              }
            }


            .invite-user-list {
              display: flex;
              justify-content: center;
              column-gap: 20rpx;
              margin-top: 20rpx;

              .user-box-img {
                width: 78rpx;
                height: 78rpx;
                background: #FAEEE8;
                // border: 1rpx solid #C19B86;

                border-radius: 50%;

                image {
                  width: 100%;
                  height: 100%;
                }
              }

              .user-get-btn {
                margin-top: 16rpx;
              }

            }

            .invite-box-tit-2 {
              display: flex;
              align-items: center;
              justify-content: space-between;
              margin-top: 30rpx;
            }
          }
        }

      }

      // right-content - end

    }

  }

  // 一堆按钮样式的配置
  .daily-task-btn-act,
  .task-btn-act {
    background: linear-gradient(270deg, #FFB75B 0%, #FC6019 100%) !important;
  }

  .daily-task-btn-def,
  .task-btn-def {
    background: linear-gradient(270deg, #E5E5E5 0%, #D3D2D2 100%) !important;
  }

  // 一堆按钮样式的配置


  .abs-btn-inner {
    position: relative;

    .red-dot {
      position: absolute;
      right: 2rpx;
      top: -8rpx;

      width: 22rpx;
      height: 22rpx;
      background: #FF2424;
      border: 2rpx solid #FFFFFF;
      border-radius: 50%;
    }

  }


  .user-get-btn-def {
    background: linear-gradient(270deg, #E5E5E5 0%, #D3D2D2 100%) !important;
  }



  /* 隐藏垂直滚动条 */
  ::-webkit-scrollbar {
    width: 0;
    height: 0;
  }

  /* 隐藏水平滚动条 */
  ::-webkit-scrollbar-horizontal {
    height: 0;
  }

  /* 隐藏垂直滚动条thumb */
  ::-webkit-scrollbar-thumb {
    background-color: transparent;
  }
</style>